package com.sxit.tdf.server.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sxit.tdf.server.entity.File;
import com.sxit.tdf.server.entity.bo.*;
import com.sxit.tdf.server.entity.vo.InsertUpLoadFileVo;
import com.sxit.tdf.server.entity.vo.SiftFileInfoVo;
import com.sxit.tdf.server.entity.vo.UpLoadPrivateFileVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;

/**
 * 服务类
 *
 * @author 橙子高
 * @since 2022-02-23
 */
public interface IFileService extends IService<File> {

  Boolean uploadFile(InsertUpLoadFileVo insertUpLoadFileVo) throws IOException;

  Boolean deleteById(String id);

  List<String> getSuffix();

  List<FileInfoBo> getAllFileInfo(
      String pathCode,
      String bucketName,
      String fileSuffix,
      Long pageSize,
      String fileOwnUserName,
      Integer current,
      String fileName);

  List<SimpleFileStoreInfo> getStoreFileInfo(List<Integer> id);

  StoreFileInfoBo getStoreFileById(String id);

  void addFileDownload(String id);

  ComplexFileMessageBo getMessage();

  IPage<ComplexFileDataBo> getComplexFileInfo(SiftFileInfoVo siftFileInfoVo);

  List<String> getALLSuffix();

  List<PrivateFileListBo> getPrivateFileList(String userId);

  boolean UpLoadPrivateFileVo(
      String userId, UpLoadPrivateFileVo upLoadPrivateFileVo, MultipartFile file)
      throws IOException;

  HashMap getPrivateFileInfoMsg(String loginIdAsString);
}
